<?php 
switch($type){
case 'lang':
?>
无
<?php
break;
case 'cate':
?>
无
<?php
break;
case 'text':
?>
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
	<td class="th">字段类型</td>
      <td>
      <select name="filed_attr[fieldtype]">
      <option value="char" <?php if($filed_attr['fieldtype']=='char') echo 'selected';?>>Char_定长字符串</option>
      <option value="varchar" <?php if($filed_attr['fieldtype']=='varchar') echo 'selected';?>>VarChar_变长字符串</option>
      </select>
      </td>
</tr>
<tr>
      <td class="th">字段类型参数</td>
      <td> <input type="text" class="input-text" size="50"  name="filed_attr[type_pram]" value="{$filed_attr['type_pram']}" /></td>
    </tr>
    <tr>
      <td class="th">默认值</td>
      <td> <input type="text" class="input-text" size="50"  name="filed_attr[default]" value="{$filed_attr['default']}" /></td>
    </tr>
</table>
<?php
break;
case 'password':
?>
<table cellpadding="2" cellspacing="1" width="100%">
    <tr>
	<td class="th">字段类型</td>
      <td>
      <select name="filed_attr[fieldtype]">
      <option value="char" <?php if($filed_attr['fieldtype']=='char') echo 'selected';?>>Char_定长字符串</option>
      <option value="varchar" <?php if($filed_attr['fieldtype']=='varchar') echo 'selected';?>>VarChar_变长字符串</option>
      </select>
      </td>
</tr>
<tr>
      <td class="th">字段类型参数</td>
      <td> <input type="text" class="input-text" size="50"  name="filed_attr[type_pram]" value="{$filed_attr['type_pram']}" /></td>
    </tr>
    <tr>
      <td class="th">默认值</td>
      <td> <input type="text" class="input-text" size="50"  name="filed_attr[default]" value="{$filed_attr['default']}" /></td>
    </tr>
</table>
<?php
break;
case 'int':
?>
<table cellpadding="2" cellspacing="1" width="100%">
  <td class="th">字段类型</td>
      <td>
      <select name="filed_attr[fieldtype]">
      <option value="tinyint" <?php if($filed_attr['fieldtype']=='tinyint') echo 'selected';?>>整数 TINYINT(3)</option>
      <option value="smallint" <?php if($filed_attr['fieldtype']=='smallint') echo 'selected';?>>整数 SMALLINT(5)</option>
      <option value="mediumint" <?php if($filed_attr['fieldtype']=='mediumint') echo 'selected';?>>整数 MEDIUMINT(8)</option>
      <option value="int" <?php if($filed_attr['fieldtype']=='int') echo 'selected';?>>整数 INT(11)</option>
      <option value="bigint" <?php if($filed_attr['fieldtype']=='bigint') echo 'selected';?>>整数 BIGINT(20)</option>
      </select>
      </td>
</tr>
     <tr> 
      <td>是否包括负数：</td>
      <td><input type="checkbox" id="" name = "filed_attr[numbertype]" value="1" <?php if($filed_attr['fieldtype']=='1') echo 'checked="checked"';?>/>不包括负数</td>
    </tr>
    <tr> 
      <td>默认值</td>
      <td><input type="text" name="filed_attr[default]" value="{$filed_attr['default']}" size="40" class="input-text"></td>
    </tr>
    <tr>
</table>
<?php
break;
case 'float':
?>
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
	<td class="th">字段类型</td>
      <td>
      <select name="filed_attr[fieldtype]">
      <option value="float" <?php if($filed_attr['fieldtype']=='float') echo 'selected';?>>Float</option>
      <option value="double" <?php if($filed_attr['fieldtype']=='double') echo 'selected';?>>Double</option>
      </select>
      </td>
</tr>
<tr>
      <td class="th">字段类型参数</td>
      <td> <input type="text" class="input-text" size="50"  name="filed_attr[type_pram]" value="{$filed_attr['type_pram']}" />
      <br/>说明: <font color="red">如“10,2”格式，第一个数字是总长度，第二个数字是小数点后位数，<br/>Float总长度不能超过10，Double总长度不能超过20，小数点位数不能超过5</font>
      </td>
    </tr>
			<tr> 
			  <td>默认值</td>
			  <td><input type="text" name="filed_attr[default]" value="{$filed_attr['default']}" size="40" class="input-text"></td>
			</tr>
		</table>
<?php
break;
case 'textarea':
?>
<table cellpadding="2" cellspacing="1" width="100%">
    <tr>
      <td class="th">字段类型</td>
          <td>
          <select name="filed_attr[fieldtype]">
          	<option value="varchar" <?php if($filed_attr['fieldtype']=='varchar') echo 'selected';?>>VARCHAR</option>
            <option value="text" <?php if($filed_attr['fieldtype']=='text') echo 'selected';?>>TEXT</option>
          	<option value="mediumtext" <?php if($filed_attr['fieldtype']=='mediumtext') echo 'selected';?>>MEDIUMTEXT</option>
          </select>
          </td>
    </tr>
    <tr>
      <td class="th">文本域行数</td>
      <td><input type="text"  class="input-text" size="5" name="filed_attr[rows]" value="{$filed_attr['rows']}" /></td>
    </tr>
    <tr>
      <td class="th">文本域列数</td>
      <td><input type="text"  class="input-text" size="5" name="filed_attr[cols]" value="{$filed_attr['cols']}" /></td>
    </tr>
    <tr>
      <td class="th">默认值</td>
      <td><textarea  name="filed_attr[default]" rows="3" cols="40">{$filed_attr['default']}</textarea></td>
    </tr>
</table>
<?php
break;
case 'button':
?>
<table cellpadding="2" cellspacing="1" width="100%">
    <tr>
      <td class="th">类型</td>
      <td>
      	<select name="filed_attr[type]">
          <option value="submit" <?php if($filed_attr['type']=='submit') echo 'selected';?>>提交按钮</option>
          <option value="reset" <?php if($filed_attr['type']=='reset') echo 'selected';?>>重置按钮</option>
          <option value="button" <?php if($filed_attr['type']=='button') echo 'selected';?>>普通按钮</option>
       </select></td>
    </tr>
    <tr>
      <td class="th">按钮文字</td>
      <td><input type="text" class="input-text" size="5" name="filed_attr[value]" value="{$filed_attr['value']}" /></td>
    </tr>
    <tr>
      <td class="th">是否生成字段</td>
      <td>
      	<input type="radio" name="filed_attr[nofiled]" value="1" class="input_checkbox" <?php if($filed_attr['nofiled']=='1'){echo "checked='checked'";} ?>/>{$Think.lang.cfg_form_tis_no}
        <input type="radio" name="filed_attr[nofiled]" value="2" class="input_checkbox" <?php if($filed_attr['nofiled']=='2'){echo "checked='checked'";} ?>/>{$Think.lang.cfg_form_tis_yes}
      </td>
    </tr>
</table>
<?php
break;
case 'radio':
?>
<table cellpadding="2" cellspacing="1" width="100%">
	<tr>
      <td class="th">选项列表</td>
			  <td>
			  <select name="filed_attr[options]">
			  <option value="">{$Think.lang.cfg_form_tis_select}</option>
			  {$dict_str}
			  </select>例: <font color="red">请选择对应数据词典</font>，如果不存在，请先<a href="?s=/Dict" target="_blank">添加词典</a></td>
	</tr>
	<tr>
      <td class="th">默认值</td>
			  <td> <input type="text" class="input-text" size="5"  name="filed_attr[default]" value="{$filed_attr['default']}" /></td>
			</tr>
		</table>
<?php
break;
case 'checkbox':
?>
<table cellpadding="2" cellspacing="1" width="100%">
			<tr>
      <td class="th">选项列表</td>
			  <td>
			   <select name="filed_attr[options]">
			  <option value="">{$Think.lang.cfg_form_tis_select}</option>
			  {$dict_str}
			  </select>例: <font color="red">请选择对应数据词典</font>，如果不存在，请先<a href="?s=/Dict" target="_blank">添加词典</a>
			  </td>
			</tr>
			<tr>
      
      <td class="th">默认值</td>
			  <td> <input type="text" class="input-text" size="5"  name="filed_attr[default]" value="{$filed_attr['default']}" /></td>
			</tr>
		</table>
<?php
break;
case 'select':
?>
<table cellpadding="2" cellspacing="1" width="100%">
    <tr>
      <td class="th">选项列表</td>
      <td>
	   <select name="filed_attr[options]">
	  <option value="">{$Think.lang.cfg_form_tis_select}</option>
	  {$dict_str}
	  </select>例: <font color="red">请选择对应数据词典</font>，如果不存在，请先<a href="?s=/Dict" target="_blank">添加词典</a>
	  </td>
    </tr>
    <tr>
      <td class="th">选项类型</td>
      <td><input type="radio" name="filed_attr[multiple]" value="0" {if $filed_attr[multiple]==0} checked{/if}> 下拉框 <input type="radio" name="filed_attr[multiple]" value="0" {if $filed_attr[multiple]==1} checked{/if}> 多选列表框</td>
    </tr>
    <tr>
      <td class="th">可见选项的数目</td>
      <td><input type="text" class="input-text" size="5" name="filed_attr[size]" value="{$filed_attr['size']}" /></td>
    </tr>
    <tr>
      <td class="th">默认值</td>
      <td> <input type="text" class="input-text" size="5"  name="filed_attr[default]" value="{$filed_attr['default']}" /></td>
    </tr>
</table>
<?php
break;
case 'htmlarea':
?>
<table cellpadding="2" cellspacing="1" width="100%">
	<tr>
      <td class="th">字段类型</td>
          <td>
          <select name="filed_attr[fieldtype]">
            <option value="text" <?php if($filed_attr['fieldtype']=='text') echo 'selected';?>>TEXT</option>
          	<option value="mediumtext" <?php if($filed_attr['fieldtype']=='mediumtext') echo 'selected';?>>MEDIUMTEXT</option>
          </select>
          </td>
    </tr>
		<tr>
      <td class="th" width="140">编辑器样式</td>
		  <td><input type="radio" name="filed_attr[toolbar]" value="basic" {if $filed_attr[toolbar]=='basic'} checked{/if}> 简洁型  <input type="radio" name="filed_attr[toolbar]" value="full" {if $filed_attr[toolbar]=='full'} checked{/if}> 标准型 </td>
		</tr>
		<tr>
      <td class="th">默认值</td>
		  <td><textarea name="filed_attr[default]" rows="3" cols="40" id="default"  >{$filed_attr['default']}</textarea></td>
		</tr>
		<tr>
      <td class="th">编辑器默认高度</td>
		  <td><input type="text" name="filed_attr[height]" value="{$filed_attr['height']}" size="4" class="input-text" ></td>
		</tr>
		<tr>
      <td class="th">是否保存远程图片</td>
		  <td><input type="radio" name="filed_attr[enablesaveimage]" value="1" {if $filed_attr[enablesaveimage]==1} checked{/if}> 是 <input type="radio" name="filed_attr[enablesaveimage]" value="0" {if $filed_attr[enablesaveimage]==0} checked{/if}> 否</td>
		</tr>
		<tr>
      <td class="th">是否允许图片上传</td>
		  <td><input type="radio" name="filed_attr[flashupload]" value="1" {if $filed_attr[flashupload]==1 || $action_name=='add'} checked{/if}> 是 <input type="radio" name="filed_attr[flashupload]" value="0" {if $filed_attr[flashupload]==0} checked{/if}> 否</td>
		</tr>
		<tr>
      <td class="th">允许图片类型</td>
		  <td><input type="text" name="filed_attr[alowuploadexts]" value="<?php if($filed_attr[alowuploadexts]){echo $filed_attr[alowuploadexts];}else{ echo 'jpg,jpeg,gif,png';} ?>" size="55" class="input-text">例: <font color="red">jpg,jpeg,gif</font></td>
		</tr>
<?php
break;
case 'signle':
?>
<table cellpadding="2" cellspacing="1" width="100%">
				<tr>
      <td class="th">默认值</td>
				  <td><input type="text" name="filed_attr[default]" value="{$filed_attr['default']}" size="40" class="input-text"></td>
				</tr>
				<tr>
      <td class="th">允许上传的文件大小</td>
				  <td><input type="text" name="filed_attr[upload_maxsize]" value="{$filed_attr['upload_maxsize']}" size="5" class="input-text">MB </td>
				</tr>
				<tr>
      <td class="th">允许上传的文件类型</td>
				  <td><input type="text" name="filed_attr[upload_allowext]" value="<?php if($filed_attr[upload_allowext]){echo $filed_attr[upload_allowext];}else{ echo 'jpg,jpeg,gif,png';} ?>" size="40" class="input-text">例: <font color="red">jpg,jpeg,gif,png</font></td>
				</tr>
				<tr>
      <td class="th">添加水印</td>
				  <td><input type="radio" name="filed_attr[watermark]" value="1" <?php if($filed_attr['watermark']==1) echo 'checked';?>> 是 <input type="radio" name="filed_attr[watermark]" value="0" <?php if($filed_attr['watermark']==0) echo 'checked';?>> 否</td>
				</tr>		
			</table>
<?php
break;
case 'atlas':
?>
<table cellpadding="2" cellspacing="1" width="100%">
				<tr>
      <td class="th">默认值</td>
				  <td><input type="text" name="filed_attr[default]" value="{$filed_attr['default']}" size="40" class="input-text"></td>
				</tr>
				<tr>
      <td class="th">最多上传图片数</td>
				  <td><input type="text" name="filed_attr[upload_maxnum]" value="{$filed_attr['upload_maxnum']}" size="5" class="input-text"></td>
				</tr>
				<tr>
      <td class="th">允许上传的图片大小</td>
				  <td><input type="text" name="filed_attr[upload_maxsize]" value="{$filed_attr['upload_maxsize']}" size="5" class="input-text">MB </td>
				</tr>
				<tr>
      <td class="th">允许图片类型</td>
				  <td><input type="text" name="filed_attr[upload_allowext]" value="<?php if($filed_attr[upload_allowext]){echo $filed_attr[upload_allowext];}else{ echo 'jpg,jpeg,gif,png';} ?>" size="40" class="input-text">例: <font color="red">jpg,jpeg,gif,png</font></td>
				</tr>
				<tr>
      <td class="th">添加水印</td>
				  <td><input type="radio" name="filed_attr[watermark]" value="1" <?php if($filed_attr['watermark']==1) echo 'checked';?>> 是 <input type="radio" name="filed_attr[watermark]" value="0" <?php if($filed_attr['watermark']==0) echo 'checked';?>> 否</td>
				</tr>
			</table>
<?php
break;
case 'file':
?>
<table cellpadding="2" cellspacing="1" width="100%">
				<tr>
      <td class="th">默认值</td>
				  <td><input type="text" name="filed_attr[default]" value="{$filed_attr['default']}" size="40" class="input-text"></td>
				</tr>
				<tr>
      <td class="th">允许上传的文件大小</td>
				  <td><input type="text" name="filed_attr[upload_maxsize]" value="{$filed_attr['upload_maxsize']}" size="5" class="input-text">MB </td>
				</tr>
				<tr>
      <td class="th">允许上传的文件类型</td>
				  <td><input type="text" name="filed_attr[upload_allowext]" value="<?php if($filed_attr[upload_allowext]){echo $filed_attr[upload_allowext];}else{ echo 'zip,rar,doc,ppt';} ?>" size="40" class="input-text"></td>
				</tr>		
			</table>
<?php
break;
case 'files':
?>
<table cellpadding="2" cellspacing="1" width="100%">
				<tr>
      <td class="th">默认值</td>
				  <td><input type="text" name="filed_attr[default]" value="{$filed_attr['default']}" size="40" class="input-text"></td>
				</tr>
				<tr>
      <td class="th">最多上传文件数</td>
				  <td><input type="text" name="filed_attr[upload_maxnum]" value="{$filed_attr['upload_maxnum']}" size="5" class="input-text"></td>
				</tr>
				<tr>
      <td class="th">允许上传的文件大小</td>
				  <td><input type="text" name="filed_attr[upload_maxsize]" value="{$filed_attr['upload_maxsize']}" size="5" class="input-text">MB </td>
				</tr>
				<tr>
      <td class="th">允许上传的文件类型</td>
				  <td><input type="text" name="filed_attr[upload_allowext]" value="<?php if($filed_attr[upload_allowext]){echo $filed_attr[upload_allowext];}else{ echo 'zip,rar,doc,ppt';} ?>" size="40" class="input-text"></td>
				</tr>			
			</table>
<?php
break;
case 'verify':
?>
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
      <td class="th">类型</td>
      <td>
      	<select name="filed_attr[type]">
          <option value="jpg" <?php if($filed_attr['type']=='jpg') echo 'selected';?>>静态验证码</option>
          <option value="gif" <?php if($filed_attr['type']=='gif') echo 'selected';?>>动态验证码</option>
          <option value="chinese" <?php if($filed_attr['type']=='chinese') echo 'selected';?>>中文验证码</option>
       </select></td>
    </tr>
</table>
<?php
break;
case 'date':
?>
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
      <td class="th">字段类型</td>
          <td>
          <select name="filed_attr[fieldtype]">
          	<option value="date" <?php if($filed_attr['fieldtype']=='date') echo 'selected';?>>DATE（y-m-d）</option>
            <option value="datetime" <?php if($filed_attr['fieldtype']=='datetime') echo 'selected';?>>DATETIME（y-m-d h:i:s）</option>
          	<option value="timestamp" <?php if($filed_attr['fieldtype']=='timestamp') echo 'selected';?>>TIMESTAMP</option>
          </select>
          </td>
    </tr>
			<tr>
      <td class="th">默认值</td>
		  <td><input type="text" class="input-text" size="30"  name="filed_attr[default]" value="{$filed_attr['default']}" /></td>
		</tr>
		<tr>
		</table>
<?php
break;
case 'linkage':
?>
<table cellpadding="2" cellspacing="1" width="100%">
<tr>
      <td class="th">联动数据</td>
          <td>
           <select name="filed_attr[options]">
			  <option value="">{$Think.lang.cfg_form_tis_select}</option>
			  {$dict_str}
			  </select>例: <font color="red">请选择对应数据词典</font>，如果不存在，请先<a href="?s=/Dict" target="_blank">添加词典</a>
          </td>
    </tr>
		</table>
<?php
break;
default :
?>
无
<?php
}
?>
